<?php

namespace App\model;

use Illuminate\Database\Eloquent\Model;

/**
 * App\model\WorkshopWeight
 *
 * @property int $id
 * @property string|null $name
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\WorkshopWeight newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\WorkshopWeight newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\WorkshopWeight query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\WorkshopWeight whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\WorkshopWeight whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\WorkshopWeight whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\WorkshopWeight whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class WorkshopWeight extends Model
{
    protected $table='workshop_weight';
    public static function getSelectOptions()
    {
        $options = \DB::table('workshop_weight')->select('id','name as text')->orderBy('id','asc')->get();
        $selectOption = [];
        foreach ($options as $option){
            $selectOption[$option->id] = $option->text;
        }
        return $selectOption;
    }
}
